import {ChangeDetectorRef, Component, Inject, Injector, OnInit} from '@angular/core';
import {SFCustomWidgetSchema, SFComponent, SFItemComponent} from '@delon/form';
import {BaseSelectAlain2Component} from '@sb/base/select/base-select-alain2.component';
import {HyProjectService} from '../service/hy-project.service';


export interface HyProjectSelectAlainSchema extends SFCustomWidgetSchema {

    valueChange?: (value: string, sfItemComp: SFItemComponent, sfComp: SFComponent) => any;
}

@Component({
    selector: 'hy-project-select-alain',
    templateUrl: './hy-project-select-alain.component.html',
    styleUrls: ['./hy-project-select-alain.component.less']
})
export class HyProjectSelectAlainComponent extends BaseSelectAlain2Component<HyProjectSelectAlainSchema> implements OnInit {
    /* 用于注册小部件 KEY 值 */
    static readonly KEY = 'hy-project-select-alain';

    constructor(
        protected hyProjectService: HyProjectService,
        @Inject(ChangeDetectorRef) public readonly cd: ChangeDetectorRef,
        @Inject(Injector) public readonly injector: Injector,
        @Inject(SFItemComponent) public readonly sfItemComp?: SFItemComponent,
        @Inject(SFComponent) public readonly sfComp?: SFComponent
    ) {
        super(hyProjectService, cd, injector, sfItemComp, sfComp);
    }
}
